﻿using House.Server.Dto;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace House.Server.WebApi.ViewModel
{
    public class StaffAndRoleViewModel
    {
        /// <summary>
        /// 添加
        /// </summary>
        /// <returns></returns>
        public static dynamic StaffAndRoleAdd(StaffAndRole list)
        {
            /// <summary>
            /// 调用员工与角色BLL中所有方法
            /// </summary>
            Service.System_StaffAndRoleSerice StaffAndRole = new Service.System_StaffAndRoleSerice();
            return StaffAndRole.Insert(list);
        }


        /// <summary>
        /// 显示员工与角色（根据员工id查询)
        /// </summary>
        /// <returns></returns>
        public static dynamic StaffAndRoleSelect1(int id)
        {
            /// <summary>
            /// 调用员工与角色BLL中所有方法
            /// </summary>
            Service.System_StaffAndRoleSerice StaffAndRole = new Service.System_StaffAndRoleSerice();
            return StaffAndRole.Select(p => p.S_id == id);
        }
        /// <summary>
        /// 修改信息
        /// </summary>
        /// <returns></returns>

        public static dynamic StaffAndRoleUpdate(StaffAndRole list)
        {
            /// <summary>
            /// 调用员工与角色BLL中所有方法
            /// </summary>
            Service.System_StaffAndRoleSerice StaffAndRole = new Service.System_StaffAndRoleSerice();
            return StaffAndRole.Update(list);
        }

    }
}